Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(baseapp): fix api break latest schema #21978

Merged
merged 5 commits into from
Sep 30, 2024
Merged

chore(baseapp): fix api break latest schema #21978

merged 5 commits into from
Sep 30, 2024

Conversation

julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Sep 30, 2024

Description

Fixes small api break in baseapp due to #21636

Resolves: https://github.com/cosmos/nightly-stack/actions/runs/11067409014/job/30750713185


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • New Features

    • Streamlined indexing and streaming registration processes for improved performance.
  • Bug Fixes

    • Enhanced error handling for streaming plugin registration.
  • Documentation

    • Updated Indexer Framework documentation to reflect new function for starting the indexer.
  • Chores

    • Updated multiple dependency versions across various modules to maintain compatibility and incorporate improvements.

@julienrbrt julienrbrt added the backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release label Sep 30, 2024
Copy link
Contributor

coderabbitai bot commented Sep 30, 2024

📝 Walkthrough

Walkthrough

The changes encompass updates to the baseapp, client, and various go.mod files across multiple modules within the Cosmos SDK. Key modifications include the transition from indexer.StartManager to indexer.StartIndexing, adjustments to listener access, and enhancements in error handling for streaming services. Additionally, the go.mod files reflect updates to the cosmossdk.io/schema dependency version, alongside the introduction of new indirect dependencies and maintenance of local module paths.

Changes

File(s) Change Summary
baseapp/streaming.go Updated initialization and registration of indexer and streaming services, changed listener access, and refined error handling for streaming plugins.
client/v2/go.mod, go.mod, simapp/go.mod, simapp/v2/go.mod, tests/go.mod, x/accounts/defaults/base/go.mod, x/accounts/defaults/lockup/go.mod, x/accounts/defaults/multisig/go.mod, x/accounts/go.mod, x/authz/go.mod, x/bank/go.mod, x/circuit/go.mod, x/consensus/go.mod, x/distribution/go.mod, x/epochs/go.mod, x/evidence/go.mod, x/feegrant/go.mod, x/gov/go.mod, x/group/go.mod, x/mint/go.mod, x/nft/go.mod, x/params/go.mod, x/protocolpool/go.mod, x/slashing/go.mod, x/staking/go.mod, x/upgrade/go.mod Updated cosmossdk.io/schema dependency from v0.3.0 to v0.3.1-0.20240930054013-7c6e0388a3f9, added/updated indirect dependencies, and maintained local replacements.

Possibly related PRs

  • build(deps): bump to core v1.0.0-alpha.1 and remove replaces #21603: This PR updates the go.mod file to bump the cosmossdk.io/core dependency to version v1.0.0-alpha.1, which may relate to the changes in the main PR that involve modifications to the BaseApp and its services, potentially requiring compatibility with the updated core version.
  • feat(server/v2): refactor the server/v2 events #21785: This PR involves a refactor of the server events and mentions the integration of appdata.Listener, which is relevant to the changes in the main PR regarding the listener structure and its handling within the BaseApp.

Suggested labels

C:x/tx, C:core/testing, Type: CI

Suggested reviewers

  • sontrinh16
  • hieuvubk
  • tac0turtle
  • aaronc

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@julienrbrt julienrbrt requested a review from a team September 30, 2024 08:30
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
x/accounts/depinject.go (1)

35-35: Approved: Comment clarity improved, consider enforcing the requirement in code.

The updated comment clearly states the requirement for the Accounts field, which is an improvement over the previous ambiguous comment. This change aligns with the Uber Golang style guide by being concise and starting with the name of the thing being documented.

Consider enforcing the "at least one account" requirement in the ProvideModule function. You could add a check like this at the beginning of the function:

func ProvideModule(in ModuleInputs) ModuleOutputs {
	if len(in.Accounts) == 0 {
		panic("at least one account must be provided")
	}
	// ... rest of the function
}

This would ensure that the requirement stated in the comment is actually enforced by the code.

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 67e6ef0 and cdd16db.

📒 Files selected for processing (1)
  • x/accounts/depinject.go (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
x/accounts/depinject.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (9)
schema/indexer/README.md (1)

9-9: LGTM with a minor suggestion for clarity.

The update to use StartIndexing instead of StartManager is correct and aligns with the changes mentioned in the summary. The explanation is clear and concise.

Consider adding a brief note about the reason for this change, such as:

-The indexer manager should be used for managing all indexers and should be integrated directly with applications wishing to support indexing. The `StartIndexing` function is used to start the manager.
+The indexer manager should be used for managing all indexers and should be integrated directly with applications wishing to support indexing. The `StartIndexing` function (previously `StartManager`) is used to start the manager. This change was made to improve clarity and consistency in the API.
x/accounts/defaults/lockup/go.mod (1)

Line range hint 3-3: Incorrect Go version specified

The Go version 1.23.1 is not a valid version. As of September 2024, the latest stable version is in the 1.22.x series. Please update to a valid and stable Go version.

Consider changing the Go version to the latest stable release, for example:

-go 1.23.1
+go 1.22.0
x/accounts/go.mod (2)

Line range hint 3-3: Incorrect Go version specified

The Go version specified (1.23.1) is not a valid Go version. As of September 2024, the latest stable version is in the 1.22.x series. Please update to a valid and current Go version.

Consider updating the Go version to the latest stable release, for example:

-go 1.23.1
+go 1.22.0

Line range hint 180-189: Track progress on module separation

The replace directives and the accompanying TODO comment indicate an ongoing process to separate modules:

// TODO remove post spinning out all modules
replace (
    cosmossdk.io/api => ../../api
    cosmossdk.io/collections => ../../collections
    cosmossdk.io/store => ../../store
    cosmossdk.io/x/bank => ../bank
    cosmossdk.io/x/staking => ../staking
    cosmossdk.io/x/tx => ../tx
)

To ensure this modularization effort stays on track:

  1. Create or update a tracking issue for the module separation process.
  2. Include a checklist of modules to be spun out.
  3. Set milestones or deadlines for completing each module's separation.
  4. Update the TODO comment with a link to the tracking issue.

This will help maintain visibility on the progress and ensure that these temporary replace directives are removed in a timely manner.

x/upgrade/go.mod (1)

Line range hint 3-3: Incorrect Go version specified

The Go version specified (1.23.1) is not a valid Go version. Go versions typically follow the format 1.x (e.g., 1.21, 1.22). Please update this to the correct Go version that the project is using.

Suggested fix:

-go 1.23.1
+go 1.21

Note: Please replace '1.21' with the actual Go version your project is using.

baseapp/streaming.go (4)

Line range hint 58-60: Clarify Error Message for Unexpected Plugin Types

The error message in registerStreamingPlugin could be more informative by specifying the expected type.

Suggested change:

 return fmt.Errorf("unexpected plugin type %T", v)
+return fmt.Errorf("unexpected plugin type %T, expected storetypes.ABCIListener", v)

Line range hint 93-95: Address TODO: Implement Transaction and Event Processing

In the ListenFinalizeBlock method, there is a TODO comment indicating that transaction and event handling is pending:

//// TODO txs, events

Please implement the logic to handle transactions and events to ensure complete functionality.

Do you need assistance in implementing this functionality or would you like me to open a GitHub issue to track this task?


Line range hint 103-121: Optimize Memory Allocation in ListenCommit Method

In the ListenCommit method, the updates slice is allocated with a length equal to len(changeSet), and for each StoreKVPair, a new ActorKVPairUpdate with a single StateChanges entry is created. This could be optimized, especially if changeSet is large.

Consider aggregating StateChanges for the same actor to reduce the number of allocations and improve performance. Here's a suggested refactor:

 func (p listenerWrapper) ListenCommit(ctx context.Context, res abci.CommitResponse, changeSet []*storetypes.StoreKVPair) error {
-	if cb := p.listener.OnKVPair; cb != nil {
-		updates := make([]appdata.ActorKVPairUpdate, len(changeSet))
-		for i, pair := range changeSet {
-			updates[i] = appdata.ActorKVPairUpdate{
-				Actor: []byte(pair.StoreKey),
-				StateChanges: []schema.KVPairUpdate{
-					{
-						Key:    pair.Key,
-						Value:  pair.Value,
-						Remove: pair.Delete,
-					},
-				},
-			}
-		}
+	if p.listener.OnKVPair != nil {
+		actorUpdates := make(map[string][]schema.KVPairUpdate)
+		for _, pair := range changeSet {
+			key := pair.StoreKey
+			actorUpdates[key] = append(actorUpdates[key], schema.KVPairUpdate{
+				Key:    pair.Key,
+				Value:  pair.Value,
+				Remove: pair.Delete,
+			})
+		}
+		updates := make([]appdata.ActorKVPairUpdate, 0, len(actorUpdates))
+		for actor, stateChanges := range actorUpdates {
+			updates = append(updates, appdata.ActorKVPairUpdate{
+				Actor:       []byte(actor),
+				StateChanges: stateChanges,
+			})
+		}
 		err := p.listener.OnKVPair(appdata.KVPairData{Updates: updates})
 		if err != nil {
 			return err
 		}
 	}

Line range hint 76-88: Simplify exposeStoreKeysSorted Function Logic

The exposeStoreKeysSorted function can be simplified by avoiding redundant allocations and improving readability.

Suggested change:

 func exposeStoreKeysSorted(keysStr []string, keys map[string]*storetypes.KVStoreKey) []storetypes.StoreKey {
-	var exposeStoreKeys []storetypes.StoreKey
 	if exposeAll(keysStr) {
-		exposeStoreKeys = make([]storetypes.StoreKey, 0, len(keys))
+		exposeStoreKeys := make([]storetypes.StoreKey, 0, len(keys))
 		for _, key := range keys {
 			exposeStoreKeys = append(exposeStoreKeys, key)
 		}
 	} else {
-		exposeStoreKeys = make([]storetypes.StoreKey, 0, len(keysStr))
 		for _, keyStr := range keysStr {
 			if storeKey, ok := keys[keyStr]; ok {
 				exposeStoreKeys = append(exposeStoreKeys, storeKey)
 			}
 		}
 	}

This removes the redundant initialization of exposeStoreKeys and enhances clarity.

📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 7ce403f and 67e6ef0.

⛔ Files ignored due to path filters (27)
  • client/v2/go.sum is excluded by !**/*.sum
  • go.sum is excluded by !**/*.sum
  • server/v2/cometbft/go.sum is excluded by !**/*.sum
  • simapp/go.sum is excluded by !**/*.sum
  • simapp/v2/go.sum is excluded by !**/*.sum
  • tests/go.sum is excluded by !**/*.sum
  • x/accounts/defaults/base/go.sum is excluded by !**/*.sum
  • x/accounts/defaults/lockup/go.sum is excluded by !**/*.sum
  • x/accounts/defaults/multisig/go.sum is excluded by !**/*.sum
  • x/accounts/go.sum is excluded by !**/*.sum
  • x/authz/go.sum is excluded by !**/*.sum
  • x/bank/go.sum is excluded by !**/*.sum
  • x/circuit/go.sum is excluded by !**/*.sum
  • x/consensus/go.sum is excluded by !**/*.sum
  • x/distribution/go.sum is excluded by !**/*.sum
  • x/epochs/go.sum is excluded by !**/*.sum
  • x/evidence/go.sum is excluded by !**/*.sum
  • x/feegrant/go.sum is excluded by !**/*.sum
  • x/gov/go.sum is excluded by !**/*.sum
  • x/group/go.sum is excluded by !**/*.sum
  • x/mint/go.sum is excluded by !**/*.sum
  • x/nft/go.sum is excluded by !**/*.sum
  • x/params/go.sum is excluded by !**/*.sum
  • x/protocolpool/go.sum is excluded by !**/*.sum
  • x/slashing/go.sum is excluded by !**/*.sum
  • x/staking/go.sum is excluded by !**/*.sum
  • x/upgrade/go.sum is excluded by !**/*.sum
📒 Files selected for processing (29)
  • baseapp/streaming.go (2 hunks)
  • client/v2/go.mod (1 hunks)
  • go.mod (1 hunks)
  • schema/indexer/README.md (1 hunks)
  • server/v2/cometbft/go.mod (1 hunks)
  • simapp/go.mod (1 hunks)
  • simapp/v2/go.mod (1 hunks)
  • tests/go.mod (1 hunks)
  • x/accounts/defaults/base/go.mod (1 hunks)
  • x/accounts/defaults/lockup/go.mod (1 hunks)
  • x/accounts/defaults/multisig/go.mod (1 hunks)
  • x/accounts/go.mod (1 hunks)
  • x/authz/go.mod (1 hunks)
  • x/bank/go.mod (1 hunks)
  • x/circuit/go.mod (1 hunks)
  • x/consensus/go.mod (1 hunks)
  • x/distribution/go.mod (1 hunks)
  • x/epochs/go.mod (1 hunks)
  • x/evidence/go.mod (1 hunks)
  • x/feegrant/go.mod (1 hunks)
  • x/gov/go.mod (1 hunks)
  • x/group/go.mod (1 hunks)
  • x/mint/go.mod (1 hunks)
  • x/nft/go.mod (1 hunks)
  • x/params/go.mod (1 hunks)
  • x/protocolpool/go.mod (1 hunks)
  • x/slashing/go.mod (1 hunks)
  • x/staking/go.mod (1 hunks)
  • x/upgrade/go.mod (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
baseapp/streaming.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

schema/indexer/README.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

tests/go.mod (1)

Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"

🔇 Additional comments (45)
schema/indexer/README.md (1)

Line range hint 1-21: Overall content looks good.

The README provides a clear and concise overview of the Indexer Framework, its integration, and configuration. The markdown formatting is correct, and the TOML example is properly formatted and up-to-date. No spelling or grammatical errors were found.

x/accounts/defaults/lockup/go.mod (3)

Line range hint 25-153: Verify impact of indirect dependency updates

Several indirect dependencies have been added or updated. While these changes are likely due to transitive dependencies, it's important to ensure they don't introduce any conflicts or security issues.

Please run the following commands to check for any potential issues:

#!/bin/bash
# Check for dependency conflicts
go mod verify
# Check for known vulnerabilities in dependencies
go list -m all | xargs go list -m -json | go run golang.org/x/vuln/cmd/govulncheck@latest -json

If any issues are found, please address them before merging this PR.


Line range hint 155-166: Verify correctness of replace directives

The replace directives are using local paths, which is common in monorepo setups. However, it's crucial to ensure these paths are correct and consistent with the project structure.

Please confirm that:

  1. All the local paths in the replace directives are correct and up-to-date.
  2. These replacements are necessary for the current development setup.
  3. There's a plan to remove or update these directives before releasing to production.

You can use the following command to verify the existence of these local paths:

#!/bin/bash
# Check if the local paths in replace directives exist
while IFS= read -r line; do
  if [[ $line =~ ^[[:space:]]*cosmossdk.io/([^[:space:]]+)[[:space:]]=>[[:space:]]([^[:space:]]+) ]]; then
    path="${BASH_REMATCH[2]}"
    if [[ -d "$path" ]]; then
      echo "Path exists: $path"
    else
      echo "Path does not exist: $path"
    fi
  fi
done < go.mod

25-25: Verify stability of pre-release dependency

The cosmossdk.io/schema dependency has been updated to a pre-release version v0.3.1-0.20240930054013-7c6e0388a3f9. While this may include necessary fixes or features, it could also introduce instability.

Please ensure that:

  1. This version is required for the changes in this PR.
  2. It has been thoroughly tested with your codebase.
  3. There's a plan to update to a stable release when available.

You can use the following command to check for any breaking changes or significant updates in this version:

x/params/go.mod (1)

32-32: Dependency version update looks good.

The update of cosmossdk.io/schema from v0.3.0 to v0.3.1-0.20240930054013-7c6e0388a3f9 aligns with the PR objective to fix the API break in the latest schema. This change should resolve the issue mentioned in the PR summary.

To ensure this update doesn't introduce any unexpected changes or break compatibility in other parts of the codebase, let's run the following verification:

x/staking/go.mod (5)

167-167: Clarify the purpose of adding github.com/cockroachdb/fifo

A new dependency github.com/cockroachdb/fifo has been added to the module. This package provides FIFO queue implementations, but it's not immediately clear why it's needed in the staking module.

Could you please clarify:

  1. The specific use case for this FIFO implementation in the staking module?
  2. Why the existing Go standard library or other Cosmos SDK utilities couldn't be used instead?

To help verify the usage, you can run the following script to search for any references to this package in the staking module:

#!/bin/bash
# Description: Search for usage of github.com/cockroachdb/fifo in the staking module

# Search for import statements
echo "Searching for import statements:"
rg --type go 'import.*"github.com/cockroachdb/fifo"' x/staking

# Search for usage of FIFO types or functions
echo "Searching for usage of FIFO types or functions:"
rg --type go 'fifo\.(New|Queue|FIFO)' x/staking

Line range hint 170-170: Clarify the purpose of adding github.com/munnerz/goautoneg

A new dependency github.com/munnerz/goautoneg has been added to the module. This package provides HTTP content negotiation functionality, but it's not immediately clear why it's needed in the staking module.

Could you please clarify:

  1. The specific use case for HTTP content negotiation in the staking module?
  2. Whether this functionality is being used directly in the staking module or if it's a transitive dependency?

To help verify the usage, you can run the following script to search for any references to this package in the staking module:

#!/bin/bash
# Description: Search for usage of github.com/munnerz/goautoneg in the staking module

# Search for import statements
echo "Searching for import statements:"
rg --type go 'import.*"github.com/munnerz/goautoneg"' x/staking

# Search for usage of goautoneg functions
echo "Searching for usage of goautoneg functions:"
rg --type go 'goautoneg\.' x/staking

168-168: Verify the necessity of updating github.com/cosmos/cosmos-db

The github.com/cosmos/cosmos-db dependency has been updated to a pre-release version (v1.0.3-0.20240911104526-ddc3f09bfc22).

Please ensure that:

  1. This update is necessary for the changes in this PR or addresses known issues.
  2. It's compatible with the current state of the staking module.
  3. There are no breaking changes that could affect the module's functionality.

You can use the following script to check for any significant changes or updates in the changelog:

#!/bin/bash
# Description: Check for significant changes in github.com/cosmos/cosmos-db

# Clone the repository
git clone https://github.com/cosmos/cosmos-db.git cosmos-db-temp
cd cosmos-db-temp

# Checkout the specific commit
git checkout ddc3f09bfc22

# Check the changelog for any breaking changes or significant updates
git log --oneline v1.0.2..ddc3f09bfc22 -- CHANGELOG.md

# Clean up
cd ..
rm -rf cosmos-db-temp

Line range hint 171-171: Verify the necessity and risks of updating golang.org/x/exp

The golang.org/x/exp dependency has been updated to a specific commit (v0.0.0-20240531132922-fd00a4e0eefc). This package contains experimental and unstable code from the Go team.

Please ensure that:

  1. The use of this experimental package is necessary for the staking module.
  2. The specific features or fixes from this commit are required for the changes in this PR.
  3. The potential risks of using experimental code have been considered and mitigated.

You can use the following script to check for any usage of this package in the staking module:

#!/bin/bash
# Description: Check for usage of golang.org/x/exp in the staking module

# Search for import statements
echo "Searching for import statements:"
rg --type go 'import.*"golang.org/x/exp' x/staking

# Search for usage of specific experimental packages
echo "Searching for usage of specific experimental packages:"
rg --type go 'exp\.(Slices|Maps|Constraints)' x/staking

Additionally, please consider if there are any stable alternatives to the experimental features being used.


166-166: Verify compatibility with the pre-release version of cosmossdk.io/schema

The cosmossdk.io/schema dependency has been updated to a pre-release version (v0.3.1-0.20240930054013-7c6e0388a3f9). While this may include important updates or fixes, pre-release versions can potentially introduce instability.

Please ensure that:

  1. This version is compatible with the rest of the codebase.
  2. Any new features or changes in this version are necessary for this PR.
  3. There are no known issues with this specific commit that could affect the stability of the staking module.

You can use the following script to check for any breaking changes or significant updates in the changelog:

✅ Verification successful

Pre-release version of cosmossdk.io/schema is compatible

The cosmossdk.io/schema dependency has been updated to a pre-release version (v0.3.1-0.20240930054013-7c6e0388a3f9). Our verification confirms that this update does not introduce any usage of experimental packages or breaking changes, ensuring compatibility and stability within the staking module.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for breaking changes or significant updates in cosmossdk.io/schema

# Clone the repository
git clone https://github.com/cosmos/cosmos-sdk.git cosmos-sdk-temp
cd cosmos-sdk-temp

# Checkout the specific commit
git checkout 7c6e0388a3f9

# Check the changelog for any breaking changes or significant updates
git log --oneline v0.3.0..7c6e0388a3f9 -- schema/CHANGELOG.md

# Clean up
cd ..
rm -rf cosmos-sdk-temp

Length of output: 361

x/consensus/go.mod (1)

30-30: Verify compatibility and test for regressions with updated schema version.

The cosmossdk.io/schema dependency has been updated to a pre-release version (v0.3.1-0.20240930054013-7c6e0388a3f9). While this update likely addresses the API break mentioned in the PR objectives, it's important to ensure it doesn't introduce any unintended side effects.

  1. Verify that this version is compatible with other dependencies in the project.
  2. Run comprehensive tests to check for any regressions or unexpected behavior changes.
  3. Consider documenting this change in the changelog, especially if it introduces any new features or breaking changes.

To ensure compatibility, run the following commands:

If these commands complete successfully without errors, it indicates that the update is likely compatible and hasn't introduced immediate issues.

x/bank/go.mod (1)

Line range hint 166-170: Verify compatibility with updated dependencies

The changes include an update to cosmossdk.io/schema and the addition of new indirect dependencies. These updates are likely related to the API break fix mentioned in the PR objectives.

Please ensure that:

  1. The updated cosmossdk.io/schema version is compatible with the rest of the codebase.
  2. The new indirect dependencies don't introduce any conflicts or security vulnerabilities.
  3. These changes have been tested thoroughly, especially focusing on the functionality affected by the API break.

To verify the impact of these changes, you can run the following commands:

The updates appear to be in line with the PR objectives. However, thorough testing is crucial to ensure these changes resolve the API break without introducing new issues.

x/evidence/go.mod (2)

Line range hint 132-138: Verify correct paths in replace directives.

The replace directives have been updated with new relative paths for several dependencies. This change ensures that the module uses local versions of these dependencies, which is typical in a monorepo structure or during local development.

Please ensure that:

  1. These paths correctly point to the intended local versions of the dependencies.
  2. This change is intentional and aligns with the project's dependency management strategy.
  3. The local versions of these dependencies are compatible with this module.

To verify the correctness of these paths, you can run the following script:

#!/bin/bash
# Description: Verify the existence and content of the replaced modules

# Function to check directory
check_dir() {
    if [ -d "$1" ]; then
        echo "Directory $1 exists."
        if [ -f "$1/go.mod" ]; then
            echo "go.mod file found in $1"
            grep "module" "$1/go.mod"
        else
            echo "Warning: go.mod not found in $1"
        fi
    else
        echo "Warning: Directory $1 does not exist"
    fi
    echo "---"
}

# Check each replaced module
check_dir "../../api"
check_dir "../../store"
check_dir "../bank"
check_dir "../staking"
check_dir "../tx"

31-31: Verify compatibility with updated schema dependency.

The cosmossdk.io/schema dependency has been updated to a pre-release version (v0.3.1-0.20240930054013-7c6e0388a3f9). While this is an indirect dependency, it's important to ensure that this update doesn't introduce any breaking changes or unexpected behavior in the module.

To verify the impact of this change, you can run the following script:

✅ Verification successful

Compatibility with the updated schema dependency has been verified.
The cosmossdk.io/schema dependency update to version v0.3.1-0.20240930054013-7c6e0388a3f9 does not introduce any breaking changes or issues. The build and tests completed successfully without errors.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any breaking changes or issues related to the schema update

# Test: Look for any usage of types or functions from the schema package
rg --type go 'cosmossdk\.io/schema'

# Test: Check if there are any compilation errors after the update
go build ./...

# Test: Run tests to ensure everything still works as expected
go test ./...

Length of output: 772

x/epochs/go.mod (1)

23-23: Verify compatibility with updated schema dependency

The cosmossdk.io/schema dependency has been updated to a pre-release version v0.3.1-0.20240930054013-7c6e0388a3f9. While this update likely includes recent improvements or fixes, please ensure that:

  1. This version is compatible with the current codebase and doesn't introduce any breaking changes.
  2. The specific features or fixes from this pre-release version are necessary for the project.

Consider monitoring for a stable v0.3.1 release of cosmossdk.io/schema and updating to it when available. To check for the latest stable version, you can run:

This will help maintain long-term stability and ease future updates.

x/authz/go.mod (3)

Line range hint 180-184: New indirect dependencies added.

The following indirect dependencies have been added:

  • github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce
  • github.com/cosmos/cosmos-db v1.0.3-0.20240911104526-ddc3f09bfc22
  • github.com/google/uuid v1.6.0

These additions are likely due to changes in direct dependencies.

Please ensure that:

  1. These indirect dependencies are necessary and don't introduce any conflicts.
  2. The specific versions used are appropriate and stable.

Run the following script to verify the necessity of these dependencies:

#!/bin/bash
# Description: Check the necessity of new indirect dependencies

# Test: Look for direct usage of these packages in the codebase
echo "Checking usage of new indirect dependencies:"
for pkg in "github.com/cockroachdb/fifo" "github.com/cosmos/cosmos-db" "github.com/google/uuid"; do
    echo "Usage of $pkg:"
    rg --type go "$pkg"
    echo "---"
done

Line range hint 189-197: Updated replace directives for local modules.

The replace directives for several cosmossdk.io modules have been updated to use ../ paths instead of ../../. This change suggests a reorganization of the module structure within the repository.

Please ensure that:

  1. The new paths correctly reflect the current repository structure.
  2. These changes don't affect the ability to build the project in different environments (e.g., CI/CD pipelines, production builds).

Run the following script to verify the correctness of the new paths:

#!/bin/bash
# Description: Verify the correctness of the new module paths

# Test: Check if the referenced modules exist at the specified paths
echo "Verifying module paths:"
for module in "bank" "staking" "tx"; do
    if [ -d "../$module" ]; then
        echo "../$module exists"
    else
        echo "Warning: ../$module does not exist"
    fi
done

33-33: Verify the impact of the schema version update.

The cosmossdk.io/schema dependency has been updated to a pre-release version v0.3.1-0.20240930054013-7c6e0388a3f9. This change aligns with the PR objective of fixing an API break.

Please ensure that:

  1. This version is compatible with other dependencies.
  2. It resolves the API break mentioned in the PR description.
  3. There are no unintended side effects in the authz module due to this update.

Run the following script to check for any compatibility issues:

x/nft/go.mod (1)

29-29: Verify the schema version update impact.

The cosmossdk.io/schema dependency has been updated to a pre-release version v0.3.1-0.20240930054013-7c6e0388a3f9. This change aligns with the PR objective to fix an API break in the latest schema.

However, it's important to ensure that this update doesn't introduce any unintended side effects or breaking changes in the nft module.

To verify the impact of this change, please run the following script:

This script will help identify any recent changes in the schema module that might affect the nft module or introduce breaking changes.

x/slashing/go.mod (1)

33-33: Approve the dependency update and suggest compatibility verification.

The update to cosmossdk.io/schema looks good. This change aligns with the PR objective of fixing an API break.

To ensure compatibility, please verify that this update doesn't introduce any breaking changes in the slashing module. You can run the following command to check for any potential issues:

If these tests pass without any issues related to the schema update, we can be more confident in the compatibility of the new version.

x/circuit/go.mod (1)

27-27: LGTM. Verify compatibility with the updated schema version.

The update to cosmossdk.io/schema v0.3.1-0.20240930054013-7c6e0388a3f9 aligns with the PR objective of fixing an API break. This pre-release version with a specific commit hash ensures reproducibility.

To ensure compatibility, please run the following commands:

If any issues arise during these checks, please address them before merging.

x/distribution/go.mod (1)

32-32: Verify the schema version update

The cosmossdk.io/schema dependency has been updated to version v0.3.1-0.20240930054013-7c6e0388a3f9. This change aligns with the PR objective to fix an API break in the latest schema.

To ensure this update is correct and doesn't introduce any unintended consequences, please run the following verification script:

Please review the output of this script to ensure the update is safe and doesn't introduce any conflicts or breaking changes.

x/accounts/go.mod (2)

Line range hint 23-27: Clarify the need for new indirect dependencies

New indirect dependencies have been added to the module:

  • github.com/cockroachdb/fifo
  • github.com/cosmos/cosmos-db
  • github.com/decred/dcrd/dcrec/secp256k1/v4
  • github.com/google/uuid

Please clarify:

  1. Why these dependencies were added.
  2. Their impact on the module's functionality and performance.
  3. Any potential security implications.

You can use the following script to check which direct dependencies are pulling in these indirect dependencies:


34-34: Verify compatibility with pre-release schema version

The cosmossdk.io/schema dependency has been updated to a pre-release version (v0.3.1-0.20240930054013-7c6e0388a3f9). While this ensures reproducibility, it may introduce breaking changes or new features.

Please ensure that:

  1. This version is compatible with the rest of the codebase.
  2. Any new features or breaking changes are properly handled.
  3. There's a plan to update to a stable version when available.

You can verify the changes in this version by running:

x/mint/go.mod (2)

32-32: LGTM: Schema dependency updated as expected.

The cosmossdk.io/schema dependency has been updated to v0.3.1-0.20240930054013-7c6e0388a3f9 as mentioned in the PR summary. This change aligns with the objective of fixing the API break.

To ensure compatibility, please verify that this version of the schema package is compatible with the rest of the codebase and doesn't introduce any breaking changes.


32-32: New indirect dependencies added.

Three new indirect dependencies have been added:

  1. github.com/cockroachdb/fifo
  2. github.com/cometbft/cometbft/api
  3. github.com/cosmos/cosmos-db

These additions are in line with the PR summary mentioning updates to indirect dependencies.

Please confirm that these new indirect dependencies are necessary and don't introduce any conflicts or security issues. It would be helpful to understand why these specific versions were chosen and if they are required by the updated cosmossdk.io/schema package or other dependencies.

Also applies to: 33-35

client/v2/go.mod (1)

30-30: Verify compatibility with the updated schema package version.

The cosmossdk.io/schema package has been updated to a pre-release version v0.3.1-0.20240930054013-7c6e0388a3f9. While this update is likely intentional to address the API break mentioned in the PR objectives, please ensure the following:

  1. Verify that this new version is compatible with the rest of the codebase and doesn't introduce any unexpected behavior.
  2. Consider adding a comment in the go.mod file or relevant documentation explaining why a pre-release version is being used.
  3. Plan to update to a stable version of cosmossdk.io/schema when it becomes available to ensure long-term stability.

To confirm compatibility, you can run the following command to check for any breaking changes or deprecations:

Review the output to ensure that any changes are expected and handled correctly in your codebase.

x/accounts/defaults/base/go.mod (1)

26-26: Approve the dependency update with a note on verification.

The update to cosmossdk.io/schema appears to be a minor version bump with a specific commit hash, which aligns with the PR's objective of fixing an API break. This change is likely to resolve compatibility issues.

To ensure this update doesn't introduce any unexpected issues, please verify:

  1. The stability of this specific version (v0.3.1-0.20240930054013-7c6e0388a3f9).
  2. Compatibility with other dependencies in the project.
  3. Any changes in the schema package that might affect the module's behavior.

You can use the following command to check for any breaking changes or significant updates in the schema package:

Review the output to ensure there are no breaking changes that could affect this module.

x/accounts/defaults/multisig/go.mod (1)

26-26: LGTM. Verify compatibility with the updated schema version.

The update of cosmossdk.io/schema to version v0.3.1-0.20240930054013-7c6e0388a3f9 looks good and aligns with the PR objective of fixing an API break. This change ensures that the module uses the latest schema version, which likely includes necessary fixes or improvements.

To ensure compatibility, please run the following command to check for any breaking changes or deprecations:

If any breaking changes or deprecations are found, please ensure that the necessary adjustments have been made in the codebase.

x/feegrant/go.mod (1)

40-40: Verify the intention behind updating cosmossdk.io/schema to a pre-release version.

The cosmossdk.io/schema dependency has been updated to a pre-release version 0.3.1-0.20240930054013-7c6e0388a3f9. While this update might be necessary to address the API break mentioned in the PR objectives, it's important to ensure that:

  1. This update is intentional and aligns with the PR's goal of fixing the API break.
  2. The potential impacts of using a pre-release version have been considered.
  3. There are no unintended side effects or breaking changes introduced by this update.

Could you please confirm that this update is necessary and explain its relationship to the API break fix?

go.mod (1)

14-14: Approve schema update and verify compatibility

The update of cosmossdk.io/schema to version v0.3.1-0.20240930054013-7c6e0388a3f9 aligns with the PR objective to fix an API break in the latest schema. This pre-release version likely contains the necessary fixes.

To ensure this update doesn't introduce any unintended side effects, please run the following verification steps:

  1. Check for any breaking changes in the schema module:

  2. Verify that all tests pass with the new schema version:

  3. Check for any deprecation warnings or new features that might affect the baseapp:

x/group/go.mod (2)

41-41: Dependency update looks good.

The update of cosmossdk.io/schema to version v0.3.1-0.20240930054013-7c6e0388a3f9 aligns with the PR objective of fixing an API break. This change appears to be the primary modification needed to address the issue.


Line range hint 1-228: Overall assessment: LGTM

The update to the cosmossdk.io/schema dependency appears to be the only significant change in this file. This modification aligns with the PR's objective of fixing an API break. No other changes were necessary, which suggests that this update alone should resolve the issue described in PR #21978.

x/upgrade/go.mod (2)

Line range hint 238-246: Verify local replace directives

The replace directives at the end of the file are using local paths. While this is common in monorepo setups, please ensure that these paths are correct and up-to-date with your current project structure.

Run the following command to verify the existence of the replaced modules:

#!/bin/bash
# Description: Verify the existence of locally replaced modules

# Test: Check if the directories exist
for dir in api store x/bank x/gov x/staking x/tx; do
    if [ ! -d "../../$dir" ]; then
        echo "Directory not found: ../../$dir"
    fi
done

45-45: Dependency update aligns with PR objectives

The update of cosmossdk.io/schema to v0.3.1-0.20240930054013-7c6e0388a3f9 appears to address the API break mentioned in the PR objectives. This change seems appropriate for resolving the issue.

To ensure this update doesn't introduce any unexpected changes or conflicts, please run the following command:

tests/go.mod (4)

Line range hint 1-268: Summary of changes and potential impact.

This update to the tests/go.mod file includes several important changes:

  1. Updating the cosmossdk.io/schema dependency to a pre-release version.
  2. Adding new dependencies related to testing utilities and modules (x/accounts, x/gov).
  3. Maintaining replace directives for local development and testing.

These changes suggest ongoing development and potential new features in the Cosmos SDK. While the updates are likely necessary for improvements, it's crucial to ensure that:

  1. The updated schema version doesn't introduce breaking changes.
  2. New dependencies are properly integrated and utilized in the test suite.
  3. The test coverage is maintained or improved, especially for new or modified modules.
  4. Replace directives accurately reflect the current SDK structure.

Please review the specific comments and run the provided verification scripts to ensure the integrity and effectiveness of the test suite.


Line range hint 236-262: Verify completeness and correctness of replace directives.

The replace directives in this go.mod file are crucial for ensuring that the tests use the latest versions of SDK modules. Please verify that:

  1. All necessary SDK modules are included in the replace directives.
  2. The paths in the replace directives correctly point to the local module directories.
  3. There are no outdated or unnecessary replace directives.

This verification is important to maintain the integrity of the test suite and ensure it accurately reflects the current state of the SDK.

To verify the replace directives, run the following script:

#!/bin/bash
# Description: Check for consistency in replace directives

# Test: List all directories in the parent folder and compare with replace directives
echo "Directories in parent folder:"
ls -d ../x/*/ | sed 's/\/$//; s/^\.\.\/x\///'

echo -e "\nReplace directives for x/ modules:"
grep 'cosmossdk.io/x/' tests/go.mod | sed 's/.*cosmossdk.io\/x\/\([^ ]*\).*/\1/'

echo -e "\nPlease manually compare these lists to ensure all necessary modules are included in the replace directives."

Line range hint 28-30: Ensure proper integration of new dependencies.

New dependencies have been added to the tests/go.mod file, including cosmossdk.io/core/testing, cosmossdk.io/x/accounts, and cosmossdk.io/x/gov. These additions suggest the introduction of new testing utilities and modules. Please ensure that:

  1. These new dependencies are properly utilized in the test suite.
  2. Any new features or changes in the x/accounts and x/gov modules are adequately covered by tests.
  3. The test suite is updated to reflect any changes in the SDK's architecture or functionality introduced by these new modules.

To verify the integration of these new dependencies, run the following script:

#!/bin/bash
# Description: Check for the usage of new dependencies in test files

# Test: Search for imports of new dependencies in test files
rg --type go -g '*_test.go' 'cosmossdk.io/(core/testing|x/accounts|x/gov)'

Also applies to: 34-35


68-68: Verify compatibility with the updated schema version.

The cosmossdk.io/schema dependency has been updated to a pre-release version (v0.3.1-0.20240930054013-7c6e0388a3f9). While this update is likely necessary for alignment with other SDK changes, it's important to ensure that it doesn't introduce any breaking changes or unexpected behavior in the tests.

To verify the compatibility, please run the following script:

simapp/go.mod (3)

Line range hint 1-65: LGTM: File structure and consistency maintained

The overall structure of the go.mod file is well-maintained. The clear separation of direct requirements, indirect dependencies, and replace directives follows Go module best practices. The extensive use of replace directives is appropriate for a development setup in a monorepo structure.


65-65: Monitor usage of new indirect dependency

A new indirect dependency google.golang.org/genproto/googleapis/rpc has been added with a pseudo-version. This likely stems from updates in one of the direct dependencies.

To ensure this addition doesn't introduce any unexpected behavior, please run the following script to check its usage:

#!/bin/bash
# Description: Check usage of the new indirect dependency

# Test: Look for imports of the new package
rg --type go 'import.*"google.golang.org/genproto/googleapis/rpc"'

# Test: Check if there are any TODO comments related to this package
rg --type go "TODO.*genproto.*rpc" --glob '!vendor/**'

Consider documenting the reason for this addition in a comment if it's not obvious from the code changes.


65-65: Verify compatibility with the updated schema version

The cosmossdk.io/schema dependency has been updated to a pre-release version v0.3.1-0.20240930054013-7c6e0388a3f9. While this likely includes necessary changes or fixes, using a pre-release version may introduce instability.

Please ensure that this update is compatible with the current codebase and doesn't introduce any breaking changes. Run the following script to check for any compatibility issues:

baseapp/streaming.go (1)

Line range hint 36-43: Verify Initialization of SyncSource Field

In the call to indexer.StartIndexing, the IndexingOptions struct has the SyncSource field set to nil. Please confirm whether this is intentional and that a nil value will not lead to issues during indexing operations.

Run the following script to check for any usages or dependencies on SyncSource that might be affected:

#!/bin/bash
# Description: Search for references to SyncSource in the codebase to verify its handling.

# Test: Find all usages of SyncSource. Expect: No critical dependencies that require a non-nil value.
rg --type go --word-regex '\bSyncSource\b' -A 3 -B 3
server/v2/cometbft/go.mod (1)

49-49: Dependency 'cosmossdk.io/schema' updated appropriately

The update to cosmossdk.io/schema version v0.3.1-0.20240930054013-7c6e0388a3f9 aligns with the fix for the API break in the baseapp component introduced in PR #21636. This change ensures compatibility with the latest schema definitions.

simapp/v2/go.mod (1)

64-64: ⚠️ Potential issue

Verify the correctness of the pseudo-version timestamp in the dependency.

The dependency cosmossdk.io/schema is updated to a pseudo-version v0.3.1-0.20240930054013-7c6e0388a3f9, which includes a timestamp 20240930054013 (September 30, 2024). Since this date is in the future, it may cause issues with dependency resolution and build reproducibility.

Run the following script to check for pseudo-versions with timestamps beyond the current date:

@@ -27,7 +27,7 @@ require (
buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect
cosmossdk.io/log v1.4.1 // indirect
cosmossdk.io/schema v0.3.0 // indirect
cosmossdk.io/schema v0.3.1-0.20240930054013-7c6e0388a3f9 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Inconsistent cosmossdk.io/schema Versions Detected Across Modules

The x/protocolpool/go.mod file has been updated to cosmossdk.io/schema version v0.3.1-0.20240930054013-7c6e0388a3f9. However, several other modules are still using version v0.3.0. This inconsistency may lead to compatibility issues.

Please update all modules to use the same version of cosmossdk.io/schema to ensure consistency and prevent potential conflicts.

🔗 Analysis chain

Approved: Dependency version update for cosmossdk.io/schema

The update of cosmossdk.io/schema to version v0.3.1-0.20240930054013-7c6e0388a3f9 aligns with the PR objective of fixing an API break. This specific version suggests it's a pre-release or development version targeted at addressing the issue.

To ensure consistency across the project, please verify that this same version update has been applied to other affected modules. You can use the following command to check for any inconsistencies:

If this command returns any results, it indicates that there are modules with different versions of cosmossdk.io/schema, which should be addressed for consistency.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for inconsistent versions of cosmossdk.io/schema across all go.mod files
find . -name go.mod -exec grep -H "cosmossdk.io/schema" {} + | grep -v "v0.3.1-0.20240930054013-7c6e0388a3f9"

Length of output: 1540

x/gov/go.mod Outdated
@@ -35,7 +35,7 @@ require (
require (
buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect
cosmossdk.io/schema v0.3.0 // indirect
cosmossdk.io/schema v0.3.1-0.20240930054013-7c6e0388a3f9 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Inconsistent cosmossdk.io/schema Versions Found

Several modules are still using the older version cosmossdk.io/schema v0.3.0. Please update these modules to v0.3.1-0.20240930054013-7c6e0388a3f9 to ensure compatibility across the project.

  • Modules to update:
    • ./collections/go.mod
    • ./core/go.mod
    • ./core/testing/go.mod
    • ./indexer/postgres/go.mod
    • ./indexer/postgres/tests/go.mod
    • ./orm/go.mod
    • ./runtime/v2/go.mod
    • ./server/v2/appmanager/go.mod
    • ./server/v2/go.mod
    • ./server/v2/stf/go.mod
    • ./store/go.mod
    • ./store/v2/go.mod
🔗 Analysis chain

LGTM. Verify compatibility with other modules.

The addition of the indirect dependency cosmossdk.io/schema v0.3.1-0.20240930054013-7c6e0388a3f9 aligns with the PR objective of fixing an API break. This pre-release version likely contains necessary updates to resolve the issue.

To ensure this change doesn't introduce compatibility issues, please run the following script to check if other modules are using compatible versions of the schema package:

If any inconsistencies are found, consider updating those modules to use the same version of the schema package to maintain compatibility across the project.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistent usage of cosmossdk.io/schema across modules

# Test: Search for cosmossdk.io/schema usage in go.mod files
echo "Checking cosmossdk.io/schema versions across modules:"
find . -name go.mod -exec grep -H "cosmossdk.io/schema" {} +

# Test: Verify that no other module is using an older version
echo "Modules using older versions of cosmossdk.io/schema:"
find . -name go.mod -exec grep -H "cosmossdk.io/schema v0.3.0" {} +

Length of output: 4935

Comment on lines +50 to 52
ABCIListeners: []storetypes.ABCIListener{listenerWrapper{listener.Listener}},
StopNodeOnErr: true,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

listenerWrapper does not implement the required ABCIListener interface methods.

  • The listenerWrapper struct does not define the ListenFinalizeBlock and ListenCommit methods required by the ABCIListener interface.
  • Consider implementing these methods within listenerWrapper to ensure correct functionality.
🔗 Analysis chain

Ensure Correct Implementation of listenerWrapper

The listenerWrapper is initialized with listener.Listener. Verify that listener.Listener correctly implements the necessary interfaces and that wrapping it is required for the desired functionality.

Run the following script to confirm the implementation details:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if listener.Listener implements the required interface methods.

# Test: List the methods of listener.Listener. Expect: Methods matching the expected interface.
ast-grep --lang go --pattern $'type Listener interface {
  $$$
}' --json

Length of output: 2316


Script:

#!/bin/bash
# Description: Retrieve the storetypes.ABCIListener interface methods.

# Extract the ABCIListener interface definition and list its methods.
ast-grep --lang go --pattern $'type ABCIListener interface {
  $$$
}' --json

Length of output: 2512


Script:

#!/bin/bash
# Description: List all methods implemented by listenerWrapper.

# Extract the listenerWrapper struct and list its methods.
ast-grep --lang go --pattern $'type listenerWrapper struct {
  $$$
}' --json

# List methods with receiver listenerWrapper
ast-grep --lang go --pattern $'func (lw listenerWrapper) $$$' --json

Length of output: 1101

@julienrbrt julienrbrt added this pull request to the merge queue Sep 30, 2024
Merged via the queue into main with commit e5b22e4 Sep 30, 2024
91 of 92 checks passed
@julienrbrt julienrbrt deleted the julien/schema branch September 30, 2024 12:13
julienrbrt added a commit that referenced this pull request Sep 30, 2024
alpe added a commit that referenced this pull request Sep 30, 2024
* main:
  chore(baseapp): fix api break latest schema (#21978)
@coderabbitai coderabbitai bot mentioned this pull request Nov 21, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants